package com.kl.common.util;

/**
 * Unicode������
 * @author zjb
 * @date 2015/10/27 11:19
 *
 */
public class UnicodeUtil {
	
	/**
	 * Unicode 地址编码
	 * @param utfString
	 * @return
	 */
	public static String convert(String utfString){
	    StringBuilder sb = new StringBuilder();
	    int i = -1;  
	    int pos = 0;  
	      
	    while((i=utfString.indexOf("\\u", pos)) != -1){  
	        sb.append(utfString.substring(pos, i));  
	        if(i+5 < utfString.length()){  
	            pos = i+6;  
	            sb.append((char) Integer.parseInt(utfString.substring(i+2, i+6), 16));
	        }  
	    }  
	      
	    return sb.toString();  
	}  
}
